//
//  ConsoleUIView.m
//  FreeSWITCH_Console
//
//  Created by Christopher Danielson on 5/1/09.
//  Copyright 2009 MaxPowerSoft, LLC. All rights reserved.
//

#import "ConsoleUIView.h"


@implementation ConsoleUIView


- (id)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        // Initialization code
    }
    return self;
}


- (void)drawRect:(CGRect)rect {
    // Drawing code
}


- (void)dealloc {
    [super dealloc];
}

#pragma mark Touches Callbacks	
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { 
	NSLog(@"touches\n");
	//Get all the touches.
	NSSet *allTouches = [event allTouches];
	//Number of touches on the screen
	
	switch ([allTouches count])
	{
		case 1:
		{
			//Get the first touch.
			UITouch *touch = [[allTouches allObjects] objectAtIndex:0];
			
			switch([touch tapCount])
			{
				case 1://Single tap
					//consoleTextView.contentMode = UIViewContentModeScaleAspectFit;
					self.contentMode = UIViewContentModeScaleAspectFit;
					break;
				case 2://Double tap.
					//consoleTextView.contentMode = UIViewContentModeCenter;
					self.contentMode = UIViewContentModeCenter;
					break;
			}
		} 
			break;
	}
	
}

@end
